let navlist = document.getElementById("nav").children[1].children;
let contentlist = document.getElementById("content").firstElementChild.children[1].children;
// document.getElementById("div").innerHTML = "111";
for (let i = 0; i < navlist.length; i++) {
    navlist[i].onclick = function(){
        navlist[i].setAttribute("index",i);
        let index = navlist[i].getAttribute("index");
        for (let k = 0; k < contentlist.length; k++) {
            contentlist[k].removeAttribute("class");
        }
        contentlist[index].className = "show";
        if(index == 0){
            document.getElementById("div").innerHTML = "理财服务";
        }else if(index == 1){
            document.getElementById("div").innerHTML = "余额计算";
        }else if(index == 2){
            document.getElementById("div").innerHTML = "支付方式";
        }else if(index == 3){
            document.getElementById("div").innerHTML = "记账";
        }else if(index == 4){
            document.getElementById("div").innerHTML = "筛选账单";
        }
    }
}